<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="renderer" content="webkit">
		<title>航运</title>
		<meta name="keywords" content="">
		<meta name="description" content="">
		<!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->
		<style type="text/css">
			.layim-chat-mine {
				display: none !important;
			}
		</style>
		<link rel="stylesheet" href="__PUBLIC__/static/layim/css/layui.css">
	</head>

	<body class="fixed-sidebar full-height-layout" style="overflow:hidden">
		{include file="common/default" /}

		<div id="wrapper">
			<nav class="navbar navbar-top-links" role="navigation" style="margin-bottom: 0">
				<!--<div class="logo-box navbar-left">
            <a class="navbar-minimalize" href="#" title="点击伸缩侧边导航"><img src="__PUBLIC__/static/img/logo-img.png"></a>
        </div>-->
				<ul class="menu-header navbar-left" id="header-menu">
				</ul>
				<ul class="nav navbar-top-links navbar-right">
					<li class="dropdown">
						<a class="dropdown-toggle count-info" data-toggle="dropdown" href="#">
							<i class="fa fa-commenting"> 通知 </i> <span class="label label-warning">2</span>
						</a>
						<ul class="dropdown-menu dropdown-alerts">
							<li>
								<a href="#">
									<div><i class="fa fa-envelope fa-fw"></i> [系统通知] <span class="text-warning">2</span> 条
										<span class="pull-right text-muted small">2017-11-29 11:00</span>
									</div>
								</a>
							</li>
						</ul>
					</li>
					<li class="dropdown">
						<a class="dropdown-toggle count-info" data-toggle="dropdown" href="#">
							<i class="fa fa-bell"> 待办 </i> <span class="label label-danger">10</span>
						</a>
						<ul class="dropdown-menu dropdown-alerts">
							<li>
								<a class="J_menuItem" href="risk_examine.html" title="风险审核">
									<div><i class="fa fa-envelope fa-fw"></i> [风险审核] <span class="text-warning">2</span> 条
										<span class="pull-right text-muted small">2017-11-29 11:00</span>
									</div>
								</a>
							</li>
							<li class="divider"></li>
							<li>
								<a href="#">
									<div><i class="fa fa-envelope fa-fw"></i>[处置任务] <span class="text-warning">6</span> 条
										<span class="pull-right text-muted small">2017-11-30 11:00</span>
									</div>
								</a>
							</li>
							<li class="divider"></li>
							<li>
								<a href="#">
									<div><i class="fa fa-envelope fa-fw"></i>[预警企业] <span class="text-warning">2</span> 条
										<span class="pull-right text-muted small">2017-11-30 11:00</span>
									</div>
								</a>
							</li>
						</ul>
					</li>
					<li id="full-page">
						<a class="count-info">
							<i class="fa fa-television"> 大屏 </i>
						</a>
					</li>
					<li class="dropdown">
						<a class="dropdown-toggle" data-toggle="dropdown" href="#">
							<i class="fa fa-user"></i>
							<span id="username">{$username}</span>
						</a>
						<ul class="dropdown-menu">
							<li>
								<a href="#">
									<i class="fa fa-file-o"></i> 账号资料
								</a>
							</li>
							<li class="divider"></li>
							<li>
								<a href="#">
									<i class="fa fa-key"></i> 密码修改
								</a>
							</li>
							<li class="divider"></li>
							<li>
								<a href="#" onclick="exit(1)">
									<i class="fa fa-sign-out"></i> 安全退出
								</a>
							</li>
						</ul>
					</li>
				</ul>
			</nav>

			<!--左侧导航开始-->
			<nav class="navbar-default navbar-static-side" role="navigation">
				<div class="sidebar-collapse">
					<ul class="nav" id="side-menu"></ul>
				</div>
			</nav>
			<!--左侧导航结束-->
			<!--右侧部分开始-->
			<div id="page-wrapper" class="gray-bg dashbard-1">
				<div class="row content-tabs">
					<button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
            </button>
					<nav class="page-tabs J_menuTabs">
						<div class="page-tabs-content">
							<a href="javascript:;" title="双击刷新" class="active J_menuTab" data-id="index_v1.html">首页</a>
						</div>
					</nav>
					<button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
            </button>
					<div class="btn-group roll-nav roll-right">
						<button class="dropdown J_tabClose" data-toggle="dropdown">操作<span class="caret"></span>

                </button>
						<ul role="menu" class="dropdown-menu dropdown-menu-right">
							<li class="J_tabShowActive">
								<a>定位当前选项卡</a>
							</li>
							<li class="divider"></li>
							<li class="J_tabCloseAll">
								<a>关闭全部选项卡</a>
							</li>
							<li class="J_tabCloseOther">
								<a>关闭其他选项卡</a>
							</li>
						</ul>
					</div>
				</div>
				<div class="row J_mainContent" id="content-main">
					<iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="{:url('Risk/risk_list')}" frameborder="0" data-id="{:url('Risk/risk_list')}" seamless></iframe>
				</div>
				<div class="footer">
					<div class="pull-right">&copy; 2016-2018
						<a href="http://www.zifsc.com.cn/" target="_blank">南京互联网信息服务有限公司</a>
					</div>
				</div>
			</div>
			<!--右侧部分结束-->
		</div>

		{include file="common/defaultBack" /}
		<script>
			$(document).ready(function() {
				//      setTimeout(function () {
				//          $.gritter.add({
				//              title: '关于金融风险监测预警平台上线试运行的通知',
				//              text: '请前往 <a href="" class="text-warning"><我的通知></a> 查看详情',
				//              time: 5000,
				//              sticky: false//是否一直显示 true/false
				//          });
				//      }, 2000);

				$("#full-page").click(function() {
					$("body").append("<div class=\"bigdata_iframe animated fadeIn\" style=\"width: 100%;height: 100%\">\n" +
						"    <iframe src=\"pages/bigdata_echarts.html\" width=\"100%\" height=\"100%\" frameborder=\"no\" scrolling=\"no\"></iframe>\n" +
						"</div>");
					if(screenfull.enabled) {
						//screenfull.request();
						//screenfull.toggle();
						screenfull.toggle($(".bigdata_iframe")[0]);
					} else {
						// Ignore or do something else
					}
				});
			});
		</script>

		<!-- 第三方插件 -->
		<script src="__PUBLIC__/static/js/plugins/pace/pace.min.js"></script>
		<script src="__PUBLIC__/static/layim/layui.js" type="text/javascript" charset="utf-8"></script>

		<script>
			layui.use('layim', function(layim) {

				layim.config({
					//初始化接口
					init: {
						type: 'get',
						url: CONTEXTPATH_PROJECT + '/index/index/user'

					}

				});
				var ws = new WebSocket("ws://127.0.0.1:1234");
				var name = $("#username").text();

				ws.onopen = function() {
					//发送登录信息
					var data = '{"type":"login","name":"' + name + '"}';
					ws.send(data);
				};

				ws.onmessage = function(res) {
					var data = res.data;
					var text = data.split(":");
					var username = text[0];
					var message = text[1];
					if(username == "系统消息") {
						var sys_info = res.data;
						var sys_text = data.split(":");
						var sys_message = sys_text[1];
						layim.getMessage({
							username: '消息',
							name: '聊天室',
							//system: true,
							avatar: "//tp1.sinaimg.cn/1571889140/180/40030060651/1",
							id: "100001",
							//type: "friend",
							content: sys_message,
							timestamp: new Date().getTime()
						});
					} else {
						layim.getMessage({
							username: username,
							name: '聊天室',

							avatar: "//tp1.sinaimg.cn/1571889140/180/40030060651/1",
							id: "100001",
							//type: "friend",
							content: message,
							timestamp: new Date().getTime()
						});
					}

				};
				

				layim.on('sendMessage', function(res) {
					var mine = res.mine; //包含我发送的消息及我的信息
					var con = mine.content; //发送的内容
					//发送
					var data = '{"type":"say","msg":"' + con + '"}';
					ws.send(data);

				});
			});
		</script>
	</body>

</html>